package base.operate;

public class Operate1 {

	public static void main(String[] args) {
//		yu();
//		huo();
//		fei();
//		yihuo();
		leftYiWei();
//		rightYiWei();
	}
	/**
	 * 按位与
	 */
	public static void yu() {
		int a = 5;
		int b = 6;
		System.out.println(a & b);
	}
	/**
	 * 按位或
	 */
	public static void huo() {
		int a = 5;
		int b = 6;
		System.out.println(a | b);
	}
	/**
	 * 按位非
	 */
	public static void fei() {
		int a = 5;
		System.out.println(~a);
	}
	/**
	 * 按位异或
	 */
	public static void yihuo() {
		int a = 5;
		int b = 6;
		System.out.println(a ^ b);
	}
	/**
	 * 向左以为操作符<<
	 */
	public static void leftYiWei(){
		int i=5;
		System.out.println(i<<=3);
	}
	/**
	 * 向右以为操作符>>
	 */
	public static void rightYiWei(){
		int i=9;
		System.out.println(i>>3);
	}

}
